package bavaria.hightech.booking;


import java.util.Calendar;

import bavaria.hightech.money.Currency;
import bavaria.hightech.money.Money;
import bavaria.hightech.time.InteranlClock;


public final class Booking {


	
	private final Long amount;
	private final Currency currency;
	private final String bookingtext;
	private final Calendar dateOfBooking;
	

	public Booking(Money amount, String bookingtext) {
		this.amount = amount.getValue();
		this.currency = amount.getCurrency();
		this.bookingtext = bookingtext;
		this.dateOfBooking = InteranlClock.getInstanze().getCalendar();
		
		


	}
	
	public Long getAmount(){
		return this.amount;
	}
	
	public String getAtem(){
		String v = (this.amount + " "+this.currency);
		return 	v;
	}
	
	
	public String getReference(){
		return this.bookingtext;
	}
	
	public Calendar getDate(){
		return this.dateOfBooking;
	}

	public String toString() {
		String write;

		write ="<tr><tb>" + this.dateOfBooking.getTime()+"</tb><tb>"+this.bookingtext+"</tb><tb>"+this.amount+" " + this.currency+"</tb></tr>";
		
		return write;
	}
}
